﻿using PMS.Web.Framework.Models;

namespace PMS.Web.Models.Stores
{
    /// <summary>
    /// WebApi Call Model For StoreInfo Select
    /// </summary>
    public class StoreSelectModel : BaseEntityModel, IXMSelectModel
	{
        public string Name { get; set; }
        public string Value 
        {
            get => Id.ToString();
            set
            {
                if (Id > 0) return;
                if (int.TryParse(value, out int storeId))
                    Id = storeId;
            }
        }
		public string Url { get; set; }
        public int Order { get; set; }
        public bool Selected { get; set; }
        public bool Disabled { get; set; }
    }
}
